/* 
 * 基础的json文件读写
 */
#ifndef _JSON_LOADER
#define _JSON_LAODER
#include "json.hpp"
#include <iostream>
#include <fstream>
#include <iomanip>
using namespace nlohmann;
class JsonLoader {
public:

	static inline void writeToFile(std::ofstream& file ,const json j) {
		file << std::setw(3) << j << std::endl;
	}
	static inline json readFromfile(std::istream file) {
		json j; //是否一次性全部读取?
		file >> j;
		return j;
	}
};
#endif